//#Author:bin
// -*- charset = utf-8 -*-
// @time:2021/12/26 18:18
// @Author:bfl91
// @file : search.js
// @Software:WebStorm
export default {
    namespaced:true,
    state:{
        cruxList:[]
    },
    mutations:{
        //添加收索关键词
        setcrux(state,txt){
            for(var i in state.cruxList){
                if(state.cruxList[i]===txt){
                    return
                }
            }
            state.cruxList.push(txt)
        },
        //删除全部关键词
        setReovem(state,txt){
            state.cruxList=[];
        }
    },
    getters:{
        getcruxList(state){
            return state.cruxList
        }
    }
}